package com.jt.service;

import com.jt.mapper.UserMapper;
import com.jt.pojo.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImp implements UserService{
    @Resource
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public User findUserById(Integer id) {
        return userMapper.findUserById(id);
    }

    @Override
    public User findUserByName(String name) {
        return userMapper.findUserByName(name);
    }

    @Override
    public List<User> findUserByAs(User user) {
        return userMapper.findUserByAs(user);
    }

    @Override
    public String updateById(User user) {
        userMapper.updateById(user);
        return "sss";
    }

    @Override
    public List<User> findUserByLike(User user) {
        return userMapper.findUserByLike(user);
    }

    @Override
    public List<User> findUserByIds(int[] ids) {
        return userMapper.findUserByIds(ids);
    }

    @Override
    public void saveUser(User user) {
        userMapper.saveUser(user);
    }


}
